package ReentrantLock;

import java.util.concurrent.locks.ReentrantLock;

public class Test {
    public static void main(String[] args){
        ReentrantLock locker = new ReentrantLock(true);
        try{
            //加锁
            locker.lock();
        } finally {
            //解锁
            locker.unlock();
        }
    }
}
